/*
 *  Function.h
 *  Genetski
 *
 *  Created by Srđan Rašić on 11/19/11.
 *
 */

#pragma once
#include <utility>
#include <vector>

/** Interface class that defines function objects. Defines methods
 * which each function representation will implement.
 */
class Function {
public:
	/**
	 * Returns function value.
	 * @param vec Point at which to calculate value
	 */
	virtual double operator() (std::vector<double> vec) const = 0;
	
	/**
	 * Returns function domain as pair of lower and upper bounds
	 */
	virtual std::pair<double, double> Domain() const = 0;
	
	/**
	 * Returns number of variables (dimensionality) of function
	 */
	virtual unsigned int Dimensions() const = 0;
};